program AutoLocService;

uses
  SysUtils,
  Windows,
  uDZProcess,
  uALSDAThread in 'uALSDAThread.pas',
  uALSLocateThread in 'uALSLocateThread.pas',
  uAppCmdLineParams in 'uAppCmdLineParams.pas',
  uAppConfig in 'uAppConfig.pas',
  uAppLog in 'uAppLog.pas',
  uAutoLocSvc in 'uAutoLocSvc.pas',
  uDefine in 'uDefine.pas',
  uCLDWProtocol in '..\common\uCLDWProtocol.pas',
  uLBMPTrackClient in '..\common\uLBMPTrackClient.pas',
  uCxtConst in '..\common\uCxtConst.pas',
  uALSConst in 'uALSConst.pas';

{$R *.res}

var
  Service: TAutoLocService;
begin
  ReportMemoryLeaksOnShutdown := CmdLineParams.DebugMode;
  if CmdLineParams.RunMode = pemNormal then AllocConsole;
  Service.Initialize;
  try
    if CmdLineParams.RunMode = pemNormal then Service.Execute
    else Service.Run;
  finally
    Service.Finalize;
  end;
  
end.
